﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SwaggerSdk
{
    public class ApiClient
    {
        //private readonly HttpHelper _httpHelper;
        private readonly HttpGather _httpGather;

        public ApiClient(HttpGather httpGather)
        {
            //_httpHelper = httpHelper;
            _httpGather = httpGather;
        }

        public async Task<RspWord> GetWordHtml(int page)
        {
            return await _httpGather.GetWordAsync(page);
        }
        /// <summary>
        /// 采集汉字
        /// </summary>
        /// <param name="word"></param>
        /// <returns></returns>
        public async Task<RspWord> GetWordHtml(string word)
        {
            return await _httpGather.GetWordAsync(word);
        }
        /// <summary>
        /// 采集词语
        /// </summary>
        /// <param name="word"></param>
        /// <returns></returns>
        public async Task<RspWords> GetWordsHtml(string word)
        {
            return await _httpGather.GetWordsAsync(word);
        }

    }
}
